<?php
//маршрутизатор
class Lib_Application{
    private function getRoute(){
        if(empty($_Get['route'])){
            $route = 'index';
        }else{
            $route = $_Get['route'];
        }
        return $route;
    }
    
    private function getController(){
        $route = $this->getRoute();
        $controller_name = 'Application_Controller_' . $route;
        return $controller_name;
    }
    
    public function getView(){
        $route = $this->getRoute();
        $path_view = 'application/view/';
        $view = $path_view . $route . '.php';
        return $view;
    }
    
    public function Run(){
        session_start();
        $controller_name = $this->getController();
        $contr = new $controller_name;
        $contr->index();
        $member = $contr->member;
        return $member;
    }
    
}
?>